package com.sj.common.lang;

/**
 * Created with IntelliJ IDEA.
 * User: xiaoqi
 * Date: 2022-07-08
 * Time: 上午 10:48
 * Description: 常量
 *
 * @author xiaoqi
 * @since 2022-07-08
 */
public class Const {

    /**
     * Map类型前缀
     */
    public static final String MAP_PREFIX = "h";

    /**
     * List类型前缀 左
     */
    public static final String LIST_PREFIX_L = "l";

    /**
     * List类型前缀 右
     */
    public static final String LIST_PREFIX_R = "r";

    /**
     * SET类型前缀
     */
    public static final String SET_PREFIX = "s";

    /**
     * ZSet类型前缀
     */
    public static final String ZSET_PREFIX = "z";

    /**
     * String类型 获取命令
     */
    public static final String GET = "get";

    /**
     * String类型 存储命令
     */
    public static final String SET = "set";

    /**
     * 判断key是否存在
     */
    public static final String EXISTS = "exists";

    /**
     * 给name追加值，如果没有先创建，再设置
     */
    public static final String APPEND = "append";

    /**
     * 获取name值的长度
     */
    public static final String STRLEN = "strlen";

    /**
     * Map类型 获取命令
     */
    public static final String H_GET = MAP_PREFIX + "get";

    /**
     * Map类型 存储命令
     */
    public static final String H_SET = MAP_PREFIX + "set";

    /**
     * List类型 从左边开始添加命令
     */
    public static final String L_PUSH = LIST_PREFIX_L + "push";

    /**
     * List类型 从左边索引开始获取
     */
    public static final String L_RANGE = LIST_PREFIX_L + "ange";

    /**
     * List类型 从右边开始添加
     */
    public static final String R_PUSH = LIST_PREFIX_R + "push";

    /**
     * List类型 从右边开始移除
     */
    public static final String R_POP = LIST_PREFIX_R + "pop";

    /**
     * List类型 从左边开始移除
     */
    public static final String L_POP = LIST_PREFIX_L + "pop";

    /**
     * List类型 通过下标获取
     */
    public static final String L_INDEX = LIST_PREFIX_L + "index";

    /**
     * List类型 返回List长度
     */
    public static final String L_LEN = LIST_PREFIX_L + "len";

    /**
     * Set类型 添加set
     */
    public static final String S_ADD = SET_PREFIX + "add";

    /**
     * 查看set里的所有元素
     */
    public static final String S_MEMBERS = SET_PREFIX + "members";


    /**
     * 判断某个元素是否为set里的元素
     */
    public static final String S_IS_MEMBER = SET_PREFIX + "ismember";


    /**
     * 获取set里的元素个数
     */
    public static final String S_CARD = SET_PREFIX + "card";


    /**
     * 移除set中某个元素
     */
    public static final String S_REM = SET_PREFIX + "rem";

    /**
     * 自增
     */
    public static final String INCR = "incr";

    /**
     * 自减
     */
    public static final String DECR = "decr";

    /**
     * 自增 自定义步长
     */
    public static final String INCRBY = "incrby";

    /**
     * 自减 自定义步长
     */
    public static final String DECRBY = "decrby";


}